package models.mapper;

import java.util.List;

import models.DrCasesort;
import models.DrCasesortExample;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import vos.Node;

public interface DrCasesortMapper {
    int countByExample(DrCasesortExample example);

    int deleteByExample(DrCasesortExample example);

    int deleteByPrimaryKey(String sortcode);

    int insert(DrCasesort record);

    int insertSelective(DrCasesort record);

    List<DrCasesort> selectByExample(DrCasesortExample example);

    DrCasesort selectByPrimaryKey(String sortcode);

    int updateByExampleSelective(@Param("record") DrCasesort record, @Param("example") DrCasesortExample example);

    int updateByExample(@Param("record") DrCasesort record, @Param("example") DrCasesortExample example);

    int updateByPrimaryKeySelective(DrCasesort record);

    int updateByPrimaryKey(DrCasesort record);
    /**
     * 获取案件种类下拉框
     */
    @Select("select SORTCODE as id,SORTNAME as text from DR_CASESORT order by SORTCODE asc")
	List<Node> getCombobox();
    /**
     * 根据分类id获取案件种类
     * @param sortid 案件种类id
     * @return
     */
    @Select("select TEMPLET from DR_CASESORT where SORTCODE=#{sortid}")
	String getTempletBySortId(String sortid);
}